/*
 * This file is part of the GUI_SDK.
 *
 * Copyright (c) 2019-2019 Link-Card.Co.Ltd. All rights reserved.
 *
 * Authors:
 *    JiangYong <1556631285@qq.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * 'Software'), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * Function:  thermal image process header
 * Created on: 2023-01-05
 */

#ifndef _THERMAL_MSG_H_
#define _THERMAL_MSG_H_

#ifdef __cplusplus
extern "C" {
#endif

/*********************************************
*  直驱动红外探测器的API接口
*  只对直驱产品有效，非该类产品切勿随意调用
*  否则可能出现无法预计的错误
*/

/*************************************************************
*  执行一次背景矫正
*  hal_thermal_background_correction
*  intput:  framenum 任意值
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_backgrd_correction(unsigned int framenum);



/*************************************************************
*  执行一次快门矫正
*  hal_thermal_shutter_correction
*  intput:  framenum 任意值
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_shutter_correction(unsigned int framenum);


/*************************************************************
*  跟新图像模式/跟新色版，
*  API需要将新色版先存放在/tmp/palette.table
*  再调用本接口，通知视频服务跟新色版
*  hal_thermal_set_palette
*  intput:  mode[1]
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_set_palette(int mode);


/*************************************************************
* 图像对比度调节
* hal_thermal_set_contrast
*  (range: 0~10,default: 5)
*  intput:  value [0~10]
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_set_contrast(int contrast);


/*************************************************************
* 图像亮度调节，非LCD亮度 
* hal_thermal_set_bright
*  (range: 0~10,default: 5)
*  intput:  value [0~10]
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_set_bright(int bright);


/*************************************************************
*  图像锐度 (和边缘增强有相近效果)
*  (range: 0~10,default: 5)
*  intput:  value [0~10]
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_set_sharpness(unsigned int value);


/**********************************************
* 设置不同的gamma组，默认选择组0
* hal_thermal_set_gamma
*	idx: 0 ~ 10,  5: 默认, 线性
*    0  img_gamma 0.5
*    1  img_gamma 0.6
*    2  img_gamma 0.7
*    3  img_gamma 0.8
*    4  img_gamma 0.9
*    5  img_gamma 1.0
*    6  img_gamma 1.2
*    7  img_gamma 1.4
*    8  img_gamma 1.6
*    9  img_gamma 1.8
*    10 img_gamma 2.0
*   建议: 对红外图像做gamma矫正。
*/
int hal_thermal_set_gamma(unsigned int idx);


/*************************************************************
*  2D去噪声强度设置
*  hal_thermal_set_2Ddenoiselevel (range: 10, default: 5) 0表示关闭
*  intput:  value [0~10]
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_set_2Ddenoiselevel(unsigned int value);


/*************************************************************
*  3D去噪声强度设置
*  hal_thermal_set_3Ddenoiselevel (range: 10, default: 5) 0表示关闭
*  intput:  value [0~10]
*  return -1: error
*          0: successful
**************************************************************/
int  hal_thermal_set_3Ddenoiselevel(unsigned int value);


/*************************************************************
*  图像翻转
*  hal_thermal_flip (range: 0-1, default: 0) 
*  intput:  value [0~1]
*  return -1: error
*          0: successful
**************************************************************/
int hal_thermal_flip(unsigned int enable);


/*************************************************************
*  图像镜像
*  hal_thermal_mirror (range: 0-1, default: 0) 
*  intput:  value [0~1]
*  return -1: error
*          0: successful
**************************************************************/
int hal_thermal_mirror(unsigned int enable);


/*************************************************************
*  电子稳像开关
*  hal_thermal_eis (range: 0-1, default: 0) 
*  intput:  enable: [0~1]
			p1:[0-100]  水平强度
			p2:[0-100]  垂直强度
			p3:[0-100]	总体强度
*  return -1: error
*          0: successful
**************************************************************/
int hal_thermal_eis(unsigned int enable, int p1, int p2, int p3);


#ifdef __cplusplus
}
#endif

#endif

